import {
  // 创建路由的api
  createRouter,
  // 创建路由的历史模式
  createWebHashHistory
} from 'vue-router'

const routes = [{
  path: '/',
  redirect: '/login'
},
{
  name: 'login',
  path: '/login',
  component: () => import('@/pages/login/login.vue')
},
{
  name: 'menu',
  path: '/menu',
  component: () => import('@/pages/menu/index.vue'),
  children: [{
    name: 'home',
    path: '/home',
    component: () => import('@/pages/home/index.vue')
  },


  ]
},
]


const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router